/* ============================================
   CHOULPILLULE — Portail
   Direction : minimal élégant
   Ivoire chaud · encre · un seul accent ardoise
   ============================================ */

:root {
    /* Couleurs */
    --bg: #F6F3EC;                        /* ivoire chaud */
    --ink: #201D18;                       /* encre chaude, presque noire */
    --muted: #8C8578;                     /* gris taupe (libellés secondaires) */
    --line: #E4DFD3;                      /* filets clairs (bordures au repos) */
    --accent: #3F5B73;                    /* bleu ardoise (accent unique) */
    --accent-soft: rgba(63, 91, 115, 0.06);
    --shadow: 0 14px 30px -18px rgba(32, 29, 24, 0.30);

    /* Typographie */
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Inter', system-ui, -apple-system, sans-serif;

    /* Divers */
    --radius: 14px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
    margin: 0;
    background-color: var(--bg);
    color: var(--ink);
    font-family: var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 3rem 1.5rem;
}

.wrap {
    width: 100%;
    max-width: 820px;
}

/* ---------- En-tête ---------- */

.hero {
    text-align: center;
    margin-bottom: 3.25rem;
    animation: rise 0.7s ease backwards;
}

.eyebrow {
    margin: 0 0 1rem;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0.28em;
    text-transform: uppercase;
    color: var(--muted);
}

.wordmark {
    margin: 0;
    font-family: var(--serif);
    font-weight: 500;
    font-size: clamp(3rem, 9vw, 4.75rem);
    line-height: 1;
    letter-spacing: 0.01em;
}

.rule {
    display: block;
    width: 44px;
    height: 1px;
    margin: 1.5rem auto 1.25rem;
    background: var(--accent);
    opacity: 0.7;
}

.tagline {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--muted);
}

/* ---------- Grille d'applications ---------- */

.apps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.1rem;
}

.tile {
    flex: 1 1 220px;
    max-width: 250px;

    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 2.1rem 1.5rem;

    text-decoration: none;
    color: var(--ink);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: var(--radius);

    transition: transform 0.3s ease, border-color 0.3s ease,
                box-shadow 0.3s ease, background-color 0.3s ease;

    /* Entrée en cascade (voir --i sur chaque tuile) */
    animation: rise 0.6s ease backwards;
    animation-delay: calc(0.18s + var(--i) * 0.07s);
}

.tile-icon {
    display: inline-flex;
    color: var(--accent);
    transition: transform 0.3s ease;
}

.tile-icon svg {
    width: 30px;
    height: 30px;
    stroke-width: 1.5;
}

.tile-name {
    font-size: 1rem;
    font-weight: 500;
    letter-spacing: 0.005em;
}

.tile:hover,
.tile:focus-visible {
    transform: translateY(-5px);
    border-color: var(--accent);
    background-color: var(--accent-soft);
    box-shadow: var(--shadow);
}

.tile:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
}

.tile:hover .tile-icon,
.tile:focus-visible .tile-icon {
    transform: translateY(-2px);
}

/* ---------- Pied ---------- */

.foot {
    margin-top: 3.25rem;
    text-align: center;
    color: var(--line);
    font-size: 0.8rem;
    letter-spacing: 0.5em;
    animation: rise 0.6s ease backwards;
    animation-delay: 0.62s;
}

/* ---------- Animation ---------- */

@keyframes rise {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Mobile ---------- */

@media (max-width: 560px) {
    body { padding: 2.5rem 1.25rem; }

    .hero { margin-bottom: 2.5rem; }

    .tile {
        flex-basis: 100%;
        max-width: none;
        flex-direction: row;
        justify-content: flex-start;
        gap: 1.1rem;
        padding: 1.4rem 1.5rem;
    }
}

/* ---------- Accessibilité : mouvement réduit ---------- */

@media (prefers-reduced-motion: reduce) {
    .hero, .tile, .foot { animation: none; }
    .tile { transition: border-color 0.2s ease, background-color 0.2s ease; }
    .tile:hover,
    .tile:focus-visible { transform: none; }
    .tile:hover .tile-icon,
    .tile:focus-visible .tile-icon { transform: none; }
}
