/* ==========================================================================
   ICM — Pages juridiques (mentions légales, protection des données, CGU,
   avertissement sur les risques).
   Présentation commune : en-tête de page, sommaire latéral ancré,
   sections numérotées, encarts de coordonnées.
   Palette : or #CB9937 / #E6BA56 / #AE791D / bronze #8E5A0B / nuit #171f2c.
   Aucune dépendance externe.
   ========================================================================== */

:root{
    --icm-primary:#CB9937;
    --icm-gold-light:#E6BA56;
    --icm-gold-dark:#AE791D;
    --icm-bronze:#8E5A0B;
    --icm-dark:#171f2c;
    --icm-muted:#5b6472;
    --icm-line:#eef0f4;
}

/* --------------------------------------------------------------------------
   1. Ossature
   -------------------------------------------------------------------------- */
.icm-legal{background:#fff;padding:54px 0 82px;}

.icm-legal-wrap{
    display:grid;
    grid-template-columns:272px minmax(0,1fr);
    gap:54px;
    align-items:start;
}
.icm-legal-aside{position:sticky;top:96px;}
.icm-legal-main{max-width:760px;}

@media(max-width:1199px){
    .icm-legal-wrap{grid-template-columns:240px minmax(0,1fr);gap:40px;}
}
@media(max-width:991px){
    .icm-legal{padding:36px 0 60px;}
    .icm-legal-wrap{grid-template-columns:1fr;gap:26px;}
    .icm-legal-aside{position:static;top:auto;}
    .icm-legal-main{max-width:none;}
}

/* --------------------------------------------------------------------------
   2. Sommaire (élément <details> : repliable sur mobile)
   -------------------------------------------------------------------------- */
.icm-legal-toc{
    border:1px solid var(--icm-line);
    border-radius:14px;
    background:#fbfcfe;
    box-shadow:0 6px 20px rgba(20,30,50,.05);
    overflow:hidden;
}
.icm-legal-toc>summary{
    list-style:none;
    cursor:pointer;
    display:flex;
    align-items:center;
    gap:10px;
    padding:15px 18px;
    margin:0;
    background:#fff;
    border-bottom:1px solid var(--icm-line);
    font-size:12px;
    font-weight:700;
    letter-spacing:1.3px;
    text-transform:uppercase;
    color:var(--icm-dark);
    user-select:none;
}
.icm-legal-toc>summary::-webkit-details-marker{display:none;}
.icm-legal-toc>summary::marker{content:"";}
.icm-legal-toc>summary:hover{color:var(--icm-gold-dark);}
/* Chevron dessiné en CSS : aucune dépendance à une police d'icônes */
.icm-legal-toc>summary .icm-legal-caret{
    margin-left:auto;
    width:8px;height:8px;
    border-right:2px solid var(--icm-primary);
    border-bottom:2px solid var(--icm-primary);
    transform:rotate(45deg);
    transition:transform .2s ease;
    flex:0 0 auto;
}
.icm-legal-toc[open]>summary .icm-legal-caret{transform:rotate(-135deg);}
/* Pastille dorée devant le libellé */
.icm-legal-toc>summary .icm-legal-dot{
    width:8px;height:8px;border-radius:50%;flex:0 0 auto;
    background:linear-gradient(135deg,var(--icm-gold-light),var(--icm-gold-dark));
}

.icm-legal-toc ol{
    list-style:none;
    margin:0;
    padding:10px 0;
    counter-reset:icmtoc;
    max-height:calc(100vh - 210px);
    overflow-y:auto;
}
@media(max-width:991px){
    .icm-legal-toc ol{max-height:56vh;}
}
.icm-legal-toc li{counter-increment:icmtoc;margin:0;}
.icm-legal-toc a{
    display:flex;
    gap:10px;
    align-items:baseline;
    padding:7px 18px;
    font-size:13.2px;
    line-height:1.5;
    color:var(--icm-muted);
    border-left:2px solid transparent;
    transition:.16s;
}
.icm-legal-toc a::before{
    content:counter(icmtoc,decimal-leading-zero);
    flex:0 0 20px;
    font-size:10.5px;
    font-weight:700;
    letter-spacing:.4px;
    color:#b6bfcd;
}
.icm-legal-toc a:hover,
.icm-legal-toc a:focus{
    color:var(--icm-gold-dark);
    background:rgba(203,153,55,.07);
    border-left-color:var(--icm-primary);
    text-decoration:none;
}
.icm-legal-toc a:hover::before{color:var(--icm-primary);}

/* --------------------------------------------------------------------------
   3. En-tête de page
   -------------------------------------------------------------------------- */
.icm-legal-head{margin-bottom:10px;padding-bottom:26px;border-bottom:1px solid var(--icm-line);}
.icm-legal-head h2{
    font-size:29px;
    line-height:1.28;
    font-weight:800;
    color:var(--icm-dark);
    margin:0 0 14px;
}
.icm-legal-rule{
    width:64px;height:3px;border-radius:3px;
    background:linear-gradient(90deg,var(--icm-primary),var(--icm-gold-dark));
    margin:0 0 18px;
}
.icm-legal-updated{
    display:inline-flex;align-items:center;gap:8px;
    margin:0;
    padding:6px 15px;
    border-radius:40px;
    background:rgba(203,153,55,.10);
    border:1px solid rgba(203,153,55,.28);
    color:var(--icm-bronze);
    font-size:12.5px;
    font-weight:600;
    letter-spacing:.2px;
}
.icm-legal-updated i{font-size:11.5px;color:var(--icm-primary);}
.icm-legal-lead{
    margin:22px 0 0;
    padding:20px 24px;
    background:#fbfaf6;
    border-left:3px solid var(--icm-primary);
    border-radius:0 12px 12px 0;
    color:#3d4757;
    font-size:15.4px;
    line-height:1.85;
}
@media(max-width:767px){
    .icm-legal-head h2{font-size:23px;}
    .icm-legal-lead{padding:16px 18px;font-size:14.6px;}
}

/* --------------------------------------------------------------------------
   4. Sections
   -------------------------------------------------------------------------- */
.icm-legal-sec{
    padding:30px 0 4px;
    border-top:1px solid var(--icm-line);
    scroll-margin-top:110px;   /* la barre de navigation est sticky (76px) */
}
.icm-legal-sec:first-of-type{border-top:0;}
.icm-legal-sec h3{
    display:flex;
    align-items:flex-start;
    gap:14px;
    font-size:18.5px;
    line-height:1.4;
    font-weight:800;
    color:var(--icm-dark);
    margin:0 0 14px;
}
.icm-legal-num{
    flex:0 0 auto;
    display:inline-flex;align-items:center;justify-content:center;
    min-width:32px;height:32px;
    border-radius:9px;
    background:linear-gradient(135deg,rgba(203,153,55,.18),rgba(203,153,55,.05));
    border:1px solid rgba(203,153,55,.22);
    color:var(--icm-gold-dark);
    font-size:12px;font-weight:800;letter-spacing:.3px;
}
@media(max-width:767px){
    .icm-legal-sec{padding-top:24px;scroll-margin-top:88px;}
    .icm-legal-sec h3{font-size:16.8px;gap:11px;}
    .icm-legal-num{min-width:28px;height:28px;font-size:11px;border-radius:8px;}
}

/* Section mise en exergue (avertissement d'ouverture de la page « risques ») */
.icm-legal-sec.is-alert{
    border:1px solid rgba(203,153,55,.34);
    border-radius:16px;
    background:linear-gradient(180deg,rgba(203,153,55,.09),rgba(203,153,55,0));
    padding:26px 28px 14px;
    margin-bottom:10px;
}
.icm-legal-sec.is-alert .icm-legal-num{background:linear-gradient(135deg,var(--icm-primary),var(--icm-gold-dark));color:#fff;border-color:transparent;}
.icm-legal-sec.is-alert .icm-legal-body{color:#4a5261;}
@media(max-width:575px){
    .icm-legal-sec.is-alert{padding:20px 18px 10px;border-radius:13px;}
}

/* --------------------------------------------------------------------------
   5. Typographie de lecture longue
   -------------------------------------------------------------------------- */
.icm-legal-body{
    color:var(--icm-muted);
    font-size:15.2px;
    line-height:1.85;
    max-width:68ch;
}
.icm-legal-body p{margin:0 0 15px;}
.icm-legal-body p:last-child{margin-bottom:0;}
.icm-legal-body strong{color:var(--icm-dark);font-weight:700;}
.icm-legal-body a{
    color:var(--icm-gold-dark);
    font-weight:600;
    text-decoration:underline;
    text-underline-offset:3px;
    text-decoration-thickness:1px;
}
.icm-legal-body a:hover{color:var(--icm-primary);}

.icm-legal-body ul{list-style:none;margin:0 0 16px;padding:0;}
.icm-legal-body ul li{position:relative;padding-left:23px;margin:0 0 9px;}
.icm-legal-body ul li::before{
    content:"";
    position:absolute;left:2px;top:11px;
    width:7px;height:7px;border-radius:2px;
    background:linear-gradient(135deg,var(--icm-gold-light),var(--icm-gold-dark));
    transform:rotate(45deg);
}
.icm-legal-body ul li:last-child{margin-bottom:0;}
@media(max-width:767px){
    .icm-legal-body{font-size:14.7px;line-height:1.8;max-width:none;}
}

/* --------------------------------------------------------------------------
   6. Encart de coordonnées
   -------------------------------------------------------------------------- */
.icm-legal-body .icm-legal-card{
    margin:16px 0 4px;
    padding:20px 24px;
    background:#fbfcfe;
    border:1px solid var(--icm-line);
    border-left:3px solid var(--icm-primary);
    border-radius:0 14px 14px 0;
    box-shadow:0 6px 18px rgba(20,30,50,.045);
}
.icm-legal-body .icm-legal-card-name{
    margin:0 0 13px;
    font-size:15px;
    font-weight:800;
    color:var(--icm-dark);
    letter-spacing:.2px;
}
.icm-legal-body .icm-legal-card-list{margin:0;padding:0;list-style:none;}
.icm-legal-body .icm-legal-card-list li{
    display:flex;
    gap:12px;
    align-items:flex-start;
    padding:0;
    margin:0 0 11px;
    font-size:14.3px;
    line-height:1.7;
    color:var(--icm-muted);
    word-break:break-word;
}
.icm-legal-body .icm-legal-card-list li::before{content:none;display:none;}
.icm-legal-body .icm-legal-card-list li:last-child{margin-bottom:0;}
.icm-legal-body .icm-legal-card-list li i{
    flex:0 0 auto;
    width:28px;height:28px;
    display:inline-flex;align-items:center;justify-content:center;
    border-radius:8px;
    background:linear-gradient(135deg,rgba(203,153,55,.18),rgba(203,153,55,.05));
    color:var(--icm-primary);
    font-size:12.5px;
    margin-top:1px;
}
.icm-legal-body .icm-legal-card-list strong{color:var(--icm-dark);font-weight:700;}
.icm-legal-body .icm-legal-card-list a{color:var(--icm-gold-dark);}
@media(max-width:575px){
    .icm-legal-body .icm-legal-card{padding:17px 16px;border-radius:0 12px 12px 0;}
    .icm-legal-body .icm-legal-card-list li{font-size:13.8px;gap:10px;}
}

/* --------------------------------------------------------------------------
   7. Impression
   -------------------------------------------------------------------------- */
@media print{
    .icm-legal-aside,.icm-banner{display:none!important;}
    .icm-legal-wrap{display:block;}
    .icm-legal-main{max-width:none;}
    .icm-legal-sec{page-break-inside:avoid;}
}
