/* ============================================
   WALLEETT — Styles communs
   Factorise les classes utilisées sur l'ensemble du site.
   À inclure dans le <head> via <link rel="stylesheet" href="/assets/css/walleett.css">
   ============================================ */

/* --------------------------------------------
   Police Inter — auto-hébergée (remplace Google Fonts)
   -------------------------------------------- */

@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-400.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-600.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-700.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: 'Inter';
    src: url('../fonts/inter-800.woff2') format('woff2');
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

/* --------------------------------------------
   Base
   -------------------------------------------- */

body {
    font-family: 'Inter', sans-serif;
    scroll-behavior: smooth;
    visibility: visible;
    opacity: 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --------------------------------------------
   Palette Walleett
   -------------------------------------------- */

.bg-walleett-gradient {
    background: linear-gradient(135deg, #2e0249 0%, #570a57 50%, #a91079 100%);
}

/* Sections sombres : remplacement du gris très foncé Tailwind par le noir-violet Walleett */
/* Cible uniquement <section> — les <div>, <article>, <aside> avec bg-gray-900 ne sont pas affectés */
section.bg-gray-900 {
    background-color: #0B0520 !important;
}

.bg-purple-950 {
    background-color: #0f0520;
}

.text-gray-100 { color: #f3f4f6; }
.text-gray-200 { color: #e5e7eb; }
.text-gray-300 { color: #d1d5db; }

.text-walleett-gradient {
    background: linear-gradient(to right, #a91079, #570a57);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-gradient {
    background: linear-gradient(to right, #a91079, #570a57);
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    filter: brightness(1.2);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(169, 16, 121, 0.3);
}

.hover-glow {
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.hover-glow:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(169, 16, 121, 0.25);
}

.image-card {
    transition: box-shadow .2s, transform .2s;
}

.image-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0,0,0,.12);
}

.image-card img {
    transition: transform .3s;
}

.image-card:hover img {
    transform: scale(1.05);
}

/* --------------------------------------------
   Mockup browser (visuels en simulation Mac)
   -------------------------------------------- */

.browser-mockup {
    border-top: 20px solid #f3f4f6;
    position: relative;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

@media (min-width: 768px) {
    .browser-mockup {
        border-top-width: 30px;
    }
}

.browser-mockup::before {
    content: '';
    position: absolute;
    top: -14px;
    left: 10px;
    width: 7px;
    height: 7px;
    background: #ff5f56;
    border-radius: 50%;
    box-shadow: 15px 0 0 #ffbd2e, 30px 0 0 #27c93f;
}

/* --------------------------------------------
   Animation rotation de mots dans le H1 (homepage)
   -------------------------------------------- */

.rotating-words {
    display: inline-block;
    position: relative;
    vertical-align: top;
    text-align: center;
    width: 100%;
}

.rotating-words .placeholder {
    visibility: hidden;
    display: inline-block;
}

.rotating-words .word {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    text-align: center;
    transform: translateY(10px);
    opacity: 0;
    animation: rotateWord 12s linear infinite;
}

@media (min-width: 640px) {
    .rotating-words .placeholder,
    .rotating-words .word {
        white-space: nowrap;
    }
}

.rotating-words .word:nth-child(2) { animation-delay: 0s; }
.rotating-words .word:nth-child(3) { animation-delay: 3s; }
.rotating-words .word:nth-child(4) { animation-delay: 6s; }
.rotating-words .word:nth-child(5) { animation-delay: 9s; }
.rotating-words .word:nth-child(6) { animation-delay: 12s; }

@keyframes rotateWord {
    0%, 2%   { opacity: 0; transform: translateY(10px); }
    5%, 18%  { opacity: 1; transform: translateY(0); }
    21%, 100%{ opacity: 0; transform: translateY(-10px); }
}

/* Accessibilité : désactivation pour utilisateurs sensibles */
@media (prefers-reduced-motion: reduce) {
    .rotating-words .word {
        animation: none;
        position: relative;
        left: auto;
        transform: none;
        opacity: 1;
        width: auto;
    }
    .rotating-words .word:not(:nth-child(2)) {
        display: none;
    }
    .rotating-words .placeholder {
        display: none;
    }
}

/* --------------------------------------------
   Grille personas "Vous êtes :"
   -------------------------------------------- */

.personas-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

@media (min-width: 1024px) {
    .personas-grid {
        display: grid;
        grid-template-columns: repeat(5, 1fr);
        gap: 1.25rem;
    }
}

/* Card : horizontal sur mobile, verticale sur desktop */
.persona-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    gap: 0;
    padding: 0;
    border-radius: 0.5rem;
    border: 1px solid #f3f4f6;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.06);
    text-decoration: none;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}

.persona-card:hover {
    box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

.persona-card-img-wrapper {
    width: 72px;
    flex-shrink: 0;
    border-radius: 0.5rem 0 0 0.5rem;
    overflow: hidden;
}

.persona-card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.persona-card-placeholder {
    width: 72px;
    flex-shrink: 0;
    border-radius: 0.5rem 0 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.persona-card-label {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.75rem;
}

.persona-card-label span {
    font-weight: 600;
    font-size: 0.875rem;
    color: #111827;
    line-height: 1.3;
}

.persona-card-label svg {
    flex-shrink: 0;
    color: #ec4899;
    transition: transform .2s;
}

.persona-card:hover .persona-card-label svg {
    transform: translateX(3px);
}

.scenarios-grid {
    row-gap: 8px;
}

@media (min-width: 1024px) {
    .persona-card {
        flex-direction: column;
        padding: 0;
        gap: 0;
        border-radius: 1rem;
    }

    .persona-card:hover {
        transform: translateY(-4px);
        box-shadow: 0 12px 32px rgba(0,0,0,.12);
    }

    .persona-card-img-wrapper {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 4;
        border-radius: 0;
    }

    .scenarios-grid {
        row-gap: 30px;
        column-gap: 5px;
    }

    .scenario-card {
        background: #f9fafb;
        border-radius: 1rem;
        box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.12);
    }

    .fidelite-img {
        max-height: 420px;
        width: auto;
    }

    .persona-card-img-wrapper img {
        transition: transform .3s;
    }

    .persona-card:hover .persona-card-img-wrapper img {
        transform: scale(1.05);
    }

    .persona-card-placeholder {
        width: 100%;
        aspect-ratio: 3 / 4;
        height: auto;
        border-radius: 0;
        font-size: 3rem;
    }

    .persona-card-label {
        padding: 1rem;
        gap: 0.5rem;
    }
}

/* --------------------------------------------
   Fix cross-browser font-weight (Chrome mobile ignore parfois les CSS vars Tailwind v4)
   -------------------------------------------- */

/* Titres : Tailwind Preflight les reset à font-weight:inherit → on force explicitement */
h1, h2, h3, h4, h5, h6 { font-weight: 700; }

/* Classes utilitaires : valeurs directes sans passer par les variables CSS */
.font-bold      { font-weight: 700 !important; }
.font-extrabold { font-weight: 800 !important; }
.font-semibold  { font-weight: 600 !important; }
.font-medium    { font-weight: 500 !important; }
.font-normal    { font-weight: 400 !important; }

/* --------------------------------------------
   Nav : rotation des chevrons des dropdowns
   -------------------------------------------- */

/* Desktop : chevron pivote quand le menu est ouvert (aria-expanded) */
[data-dropdown-trigger][aria-expanded="true"] > svg {
    transform: rotate(180deg);
}

/* Mobile : chevron pivote quand l'accordéon <details> est ouvert */
details[open] > summary > .accordion-chevron {
    transform: rotate(180deg);
}

/* Supprime le marqueur natif de <summary> (triangle par défaut) */
summary {
    list-style: none;
}
summary::-webkit-details-marker {
    display: none;
}
