/* =========================
   Base
========================= */
*{
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root{
    --bg: #ffffff;
    --main-bg: #ecc5c5;
    --card: #ffffff;
    --text: #1f1f1f;
    --muted: #555;
    --accent: rgb(228, 35, 193);
    --accent2: rgb(255, 0, 136);
    --shadow: 0 10px 25px rgba(0,0,0,.12);
    --shadow2: 0 6px 18px rgba(0,0,0,.10);
}

body{
    background-color: var(--bg);
    color: var(--text);
    font-family: Arial, sans-serif;
    line-height: 1.55;
}

/* =========================
   Header / Navbar
========================= */
header{
    width: 100%;
}

.navbar{
    width: 100%;
    background: linear-gradient(0deg, rgba(148,50,217,1) 9%, rgba(244,60,209,1) 73%);
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 10px;
}

.navbar a{
    color: white;
    text-decoration: none;
    font-size: 18px;
    padding: 10px 14px;
    border-radius: 12px;
    transition: transform .15s ease, background-color .15s ease;
}

.navbar a:hover{
    background-color: rgba(138, 43, 226, .75);
    transform: translateY(-1px);
    color: #000;
}

/* =========================
   Main wrapper
========================= */
main{
    background-color: var(--main-bg);
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 18px;
    display: flex;
    flex-direction: column;
    gap: 22px;
}

/* Headings */
h2, h3{
    display: flex;
    justify-content: center;
    color: #000;
    margin: 10px 0;
    text-align: center;
}

h2{ font-size: 28px; }
h3{ font-size: 22px; }

/* Small intro paragraphs */
.debut{
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    color: var(--muted);
    padding: 6px 10px;
}

/* =========================
   Sections layout
========================= */

/* CASE 1 = grille de personnes */
.case1{
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
    justify-content: center;
    align-items: stretch;
}

/* Carte personne */
.info{
    background: var(--card);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: var(--shadow2);
    transition: transform .15s ease, box-shadow .15s ease;
}

.info:hover{
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.photoAutiste{
    width: 100%;
    height: 190px;
    object-fit: cover;
    display: block;
}

.nomd{
    font-weight: bolder;
}

.info p{
    padding: 12px 14px 14px;
    color: #222;
    font-weight: 600;
}

/* ✅ Van Gogh & autres portraits : on voit toute l’image */
.photoAutiste--contain{
    object-fit: contain;
    background: #f2f2f2;
}

/* CASE 3 = blocs 2 colonnes */
.case3{
    width: 100%;
    background-color: #bbf4eb;
    border-radius: 18px;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.case3 .page1{
    background: rgba(255,255,255,.85);
    border-radius: 16px;
    padding: 16px;
    box-shadow: var(--shadow2);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* ✅ Les 2 vidéos du haut (et toutes dans .case3) = même taille */
.case3 .page1 video{
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    object-fit: cover; /* change en contain si tu ne veux aucun recadrage */
    border-radius: 14px;
    background: #000;
}

/* Images dans page1 */
#signification{
    width: 100%;
    height: 240px;
    object-fit: cover;
    border-radius: 14px;
}

#cerveau{
    width: min(360px, 100%);
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 14px;
}

/* Texte long */
.case4{
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    font-family: 'Courier New', Courier, monospace;
}

/* =========================
   Image tableau
========================= */
.image-container{
    width: 100%;
    background-color: #c1ddf1;
    border-radius: 18px;
    padding: 18px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: var(--shadow2);
    margin-top: 10px;
}

#table{
    width: 100%;
    max-width: 980px;
    height: auto;
    display: block;
    border-radius: 12px;
}

/* =========================
   Personnage section (fond noir)
========================= */
.pageentière{
    width: 100%;
    background: #000;
    border-radius: 18px;
    padding: 18px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.page11{
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ligne11, .ligne22{
    display: flex;
    gap: 14px;
    align-items: stretch;
}

.cases, .casses{
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.element22{
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.element22 img{
    width: min(260px, 100%);
    height: auto;
    border-radius: 18px;
    box-shadow: 0 10px 25px rgba(255,255,255,.08);
}

.caqse{
    border-radius: 14px;
    border: 2px groove var(--accent2);
    background: #0b0b0b;
    padding: 12px;
}

.textefiche{
    color: #fff;
    padding-left: 6px;
}

.tttitre{
    color: var(--accent);
    padding-left: 6px;
    width: 100%;
    text-align: left;
}

/* =========================
   Responsive
========================= */
@media (max-width: 1100px){
    .case3{
        grid-template-columns: 1fr;
    }
    .pageentière{
        grid-template-columns: 1fr;
    }
    .ligne11, .ligne22{
        flex-direction: column;
    }
}

@media (max-width: 700px){
    main{
        padding: 18px 12px;
    }
    .navbar a{
        font-size: 16px;
        padding: 8px 10px;
    }
    h2{ font-size: 24px; }
    h3{ font-size: 20px; }
    .photoAutiste{ height: 170px; }
}
