/*
 * Mon Déclic Intérieur (layout-declic.html.php), par-dessus Bootstrap 3.3.7.
 * Les écrans utilisent les composants Bootstrap (grille, form-group, form-control,
 * checkbox, btn, alert, help-block) ; ce fichier n'ajoute que le propre au Déclic,
 * en classes dc-* pour ne pas entrer en conflit avec les feuilles du site.
 * Charte « nuit et or » (maquette docs/slide0.png) : fond bleu nuit en dégradé,
 * titres Playfair Display dorés, texte blanc, bouton doré. Couleurs dans les
 * variables ci-dessous.
 * Mobile d'abord : pleine largeur sur téléphone, colonne centrée au-delà.
 * Déclic fait depuis le site (layout-declic-site.html.php) : mêmes classes dc-* dans
 * .dc-site, qui redéfinit les variables en clair, aux couleurs du site ; les
 * composants Bootstrap y gardent le style du site (les règles .dc-body ne s'y
 * appliquent pas).
 */

.dc-body {
    --dc-night: #0b1450;        /* bords du fond */
    --dc-night-mid: #1b2d8c;    /* centre du fond */
    --dc-gold: #f2d68a;         /* titres, liens */
    --dc-gold-deep: #e2b85c;    /* bas du bouton, bordures */
    --dc-ink: #121a4a;          /* texte sur fond doré ou blanc */
    --dc-text: rgba(255, 255, 255, .94);
    --dc-muted: rgba(255, 255, 255, .68);
    --dc-line: rgba(255, 255, 255, .16);
    --dc-panel: rgba(255, 255, 255, .07);
    --dc-title-font: 'Playfair Display', serif;
    --dc-text-font: 'Inter', sans-serif;
    --dc-quote-text: #fff;
    --dc-key-bg: rgba(242, 214, 138, .09);
    --dc-key-border: rgba(242, 214, 138, .55);
    --dc-card-border: var(--dc-gold-deep);

    min-height: 100vh;
    background: var(--dc-night) radial-gradient(ellipse at 50% 30%, var(--dc-night-mid) 0%, #132173 45%, var(--dc-night) 100%);
    color: var(--dc-text);
    font-family: 'Inter', sans-serif;
    font-size: 16px;
}

/* Variante claire, dans la page du site */
.dc-site {
    --dc-night: #fff;           /* fond (anneau de focus des cartes) */
    --dc-gold: #2a3ca2;         /* titres, liens, accents : bleu du site */
    --dc-gold-deep: #2a3ca2;
    --dc-ink: #1c1e21;
    --dc-text: #1c1e21;
    --dc-muted: #55554f;
    --dc-line: #e3e1da;
    --dc-panel: #f1efe8;
    --dc-title-font: inherit;
    --dc-text-font: inherit;
    --dc-quote-text: #1c1e21;
    --dc-key-bg: #eef0fa;
    --dc-key-border: #c9cfee;
    --dc-card-border: #777;
}
.dc-site .dc-page { min-height: 0; margin: 8px 0 32px; padding: 0; }
.dc-site .dc-spacer { flex: none; height: 8px; }
.dc-site .btn + .btn { margin-top: 10px; }
.dc-site .btn { white-space: normal; }

.dc-body a { color: var(--dc-gold); }
.dc-body a:hover, .dc-body a:focus { color: #fff3cf; }

/* Boutons : principal doré, secondaire en contour doré */
.dc-body .btn { white-space: normal; font-family: inherit; border-radius: 12px; }
.dc-body .btn-lg { font-size: 18px; font-weight: 700; padding: 13px 20px; }
.dc-body .btn + .btn { margin-top: 10px; }
.dc-body .btn-primary,
.dc-body a.btn-primary {
    color: var(--dc-ink);
    background: linear-gradient(180deg, #f5df9c 0%, var(--dc-gold-deep) 100%);
    border: 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, .25);
}
.dc-body .btn-primary:hover, .dc-body .btn-primary:focus, .dc-body .btn-primary:active,
.dc-body a.btn-primary:hover, .dc-body a.btn-primary:focus, .dc-body a.btn-primary:active {
    color: var(--dc-ink);
    background: linear-gradient(180deg, #f8e7b3 0%, #e8c26c 100%);
}
.dc-body .btn-primary:focus { outline: 2px solid #fff; outline-offset: 2px; }
/* Bouton indigo (boutons de conclusion) */
.dc-body a.dc-btn-indigo { color: #fff; background: #3f4fc4; border: 0; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.dc-body a.dc-btn-indigo:hover, .dc-body a.dc-btn-indigo:focus, .dc-body a.dc-btn-indigo:active { color: #fff; background: #4d5ed6; }
.dc-body .btn-default,
.dc-body a.btn-default { color: var(--dc-gold); background: transparent; border: 1.5px solid var(--dc-gold-deep); }
.dc-body .btn-default:hover, .dc-body .btn-default:focus, .dc-body .btn-default:active { color: var(--dc-ink); background: var(--dc-gold); border-color: var(--dc-gold); }

/* Formulaires : champs blancs sur le fond de nuit */
.dc-body .form-control { font-family: inherit; color: var(--dc-ink); background: #fff; border: 0; border-radius: 10px; }
.dc-body .form-control:focus { box-shadow: 0 0 0 3px rgba(242, 214, 138, .6); }
.dc-body .control-label, .dc-body .checkbox label { color: var(--dc-text); }
.dc-body .has-error .control-label, .dc-body .has-error .help-block, .dc-body .has-error .checkbox label { color: #ffb8b0; }
.dc-body .has-error .form-control { box-shadow: 0 0 0 2px #ff8a7d; }
.dc-body .help-block { color: var(--dc-muted); }

/* Alertes Bootstrap : panneaux translucides */
.dc-body .alert { border-radius: 10px; color: var(--dc-text); }
.dc-body .alert-info { background: var(--dc-panel); border: 1px solid var(--dc-line); }
.dc-body .alert-success { background: rgba(120, 220, 160, .12); border: 1px solid rgba(120, 220, 160, .4); }
.dc-body .alert-warning { background: rgba(242, 214, 138, .12); border: 1px solid rgba(242, 214, 138, .45); }
.dc-body .alert-danger { background: rgba(255, 120, 105, .14); border: 1px solid rgba(255, 138, 125, .5); }

/* En-tête : logo et nom, en or sur le fond (pas de bandeau) */
.dc-header { padding: 14px 0 0; }
.dc-header .container { display: flex; align-items: center; justify-content: center; gap: 10px; }
.dc-header-home { display: block; line-height: 0; }
.dc-header-logo { height: 40px; width: auto; }
.dc-header-name { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--dc-gold-deep); line-height: 1.3; }
.dc-header-name small { display: block; font-size: 11px; letter-spacing: .12em; color: var(--dc-muted); }

/* Contenu : une colonne qui s'étire jusqu'en bas sur téléphone */
.dc-page { display: flex; flex-direction: column; gap: 16px; min-height: calc(100vh - 54px); padding: 20px 0 32px; }
/* Barres d'outils des navigateurs mobiles : hauteur visible réelle quand elle est connue */
@supports (min-height: 100svh) { .dc-page { min-height: calc(100svh - 54px); } }
.dc-page > * { margin-top: 0; margin-bottom: 0; }
@media (min-width: 768px) {
    .dc-page { min-height: 0; margin: 24px 0 40px; padding: 8px 24px 0; }
}

.dc-title { font-family: var(--dc-title-font); font-size: 30px; line-height: 1.2; font-weight: 700; color: var(--dc-gold); text-align: center; }
@media (min-width: 768px) { .dc-title { font-size: 38px; } }
.dc-text { font-size: 18px; line-height: 1.55; }
.dc-site .dc-text, .dc-site .dc-insight, .dc-site .dc-safety { color: var(--dc-text); }
.dc-small { font-size: 14px; color: var(--dc-muted); }
.dc-step { font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--dc-gold-deep); text-align: center; }
.dc-legal { font-size: 12px; color: var(--dc-muted); }
.dc-link { display: block; text-align: center; font-size: 14px; }
/* Pas de cadre au clic de souris ; gardé à la navigation au clavier (:focus-visible) */
.dc-link:focus:not(:focus-visible), .dc-link:active { outline: none; box-shadow: none; }
.dc-spacer { flex: 1; }
@media (min-width: 768px) { .dc-spacer { flex: none; height: 8px; } }

.dc-form { display: flex; flex-direction: column; gap: 4px; }
.dc-form .form-group { margin-bottom: 10px; }
.dc-form textarea.form-control { resize: vertical; min-height: 120px; }
.dc-form .checkbox label { line-height: 1.45; }
.dc-message { padding: 12px 14px; border-radius: 10px; background: var(--dc-panel); border: 1px solid var(--dc-line); }

/* Accueil (E0, landing.html.php) : plein écran, centré */
.dc-body-landing .dc-page { min-height: 100vh; margin: 0; padding: 32px 0 20px; }
@supports (min-height: 100svh) { .dc-body-landing .dc-page { min-height: 100svh; } }
.dc-landing { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; }
.dc-landing > * { margin: 0; }
/* Icône de l'application (web/images/app-icon.png, 512 px, coins déjà arrondis) */
.dc-app-icon { width: 80px; height: 80px; border-radius: 18px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.dc-eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--dc-gold-deep); }
.dc-hero-title { font-family: 'Playfair Display', serif; font-weight: 700; font-size: 38px; line-height: 1.15; color: var(--dc-gold); max-width: 760px; }
@media (min-width: 768px) { .dc-hero-title { font-size: 58px; } }
.dc-hero-text { font-size: 18px; line-height: 1.55; max-width: 600px; }
@media (min-width: 768px) { .dc-hero-text { font-size: 20px; } }
.dc-body .dc-hero-cta { min-width: 260px; margin-top: 8px; padding: 16px 40px; font-size: 22px; }
.dc-hero-tagline { font-family: 'Playfair Display', serif; font-style: italic; font-size: 17px; color: var(--dc-text); }
.dc-footer-links { text-align: center; font-size: 13px; }
.dc-body .dc-footer-links a { color: var(--dc-muted); }

/* Cartes face cachée (_cards.html.php) : un bouton par carte. Même dos que les
   tirages du site (fond #2a3ca2, logo bg-card.png, format 60 × 75), bordure dorée
   pour ressortir sur le fond de nuit ; un peu plus grand quand il n'y a que 2 cartes. */
.dc-cards { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; }
.dc-card {
    position: relative;
    padding: 0;
    border: 1px solid var(--dc-card-border);
    border-radius: 6px;
    background: #2a3ca2;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
    transition: transform .15s ease, box-shadow .15s ease;
}
.dc-card-inner { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: url('../images/bg-card.png?v=4') no-repeat center; } /* 36 × 45, taille réelle (net) */
.dc-cards-large .dc-card { width: 84px; height: 105px; }
.dc-cards-small { gap: 8px; }
.dc-cards-small .dc-card { width: 60px; height: 75px; }
@media (min-width: 768px) {
    .dc-cards-large { gap: 24px; }
    .dc-cards-small { gap: 14px; }
}
.dc-card:hover, .dc-card:focus { transform: translateY(-4px); box-shadow: 0 8px 22px rgba(242, 214, 138, .35); outline: none; }
.dc-card:focus { box-shadow: 0 0 0 2px var(--dc-night), 0 0 0 4px var(--dc-gold); }
.dc-cards-sent .dc-card { opacity: .6; cursor: wait; transform: none; }

/* Citation (C5) : italique Playfair, filet doré */
.dc-quote { margin: 0; padding: 10px 20px; border: 0; border-left: 3px solid var(--dc-gold-deep); border-radius: 0; background: none; }
.dc-quote p { font-family: var(--dc-title-font); font-size: 20px; line-height: 1.55; font-style: italic; color: var(--dc-quote-text); }
.dc-quote footer { margin-top: 10px; text-align: right; color: var(--dc-muted); }
.dc-quote footer:before { content: ''; }

/* Vidéo YouTube 16:9 (E3, conclusion) : embed-responsive de Bootstrap */
.dc-video { background: #050a2e; border-radius: 12px; }
.dc-video-placeholder { display: flex; align-items: center; justify-content: center; background: var(--dc-panel); border: 1.5px dashed var(--dc-line); color: var(--dc-muted); font-size: 14px; }

/* Éclairage de l'IA (C6, C7, P4) */
.dc-wait { display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; padding: 24px 0; }
.dc-spinner { width: 56px; height: 56px; border-radius: 50%; border: 4px solid var(--dc-line); border-top-color: var(--dc-gold); animation: dc-spin 1s linear infinite; }
@keyframes dc-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .dc-spinner { animation-duration: 3s; } }
/* Texte rédigé par l'IA : à même la page (lecture longue), signalé par la mention
   « IA » au-dessus (.dc-ai-label). */
.dc-insight { font-size: 18px; line-height: 1.65; }
.dc-ai-label { font-size: 12px; letter-spacing: .06em; color: var(--dc-muted); margin-bottom: -8px !important; }
/* Texte de l'IA en paragraphes (DeclicAi::textToHtml) */
.dc-body .dc-paras p { margin: 0 0 .9em; }
.dc-body .dc-paras p:last-child { margin-bottom: 0; }
/* Phrase clé (« À retenir ») : encadré doré, en Playfair */
.dc-key { padding: 16px 20px; border: 1px solid var(--dc-key-border); border-radius: 12px; background: var(--dc-key-bg); font-family: var(--dc-title-font); font-size: 22px; line-height: 1.35; font-weight: 700; color: var(--dc-gold); text-align: center; }
.dc-key-label { display: block; margin-bottom: 6px; font-family: var(--dc-text-font); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--dc-gold-deep); }
/* Écran d'alerte : au contraire, le message doit ressortir */
.dc-safety { font-size: 18px; line-height: 1.6; margin: 0; }

/* Synthèse (S2) */
.dc-recap { display: flex; flex-direction: column; gap: 14px; }
.dc-recap p { margin: 0; }
.dc-recap-draw { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--dc-line); }
.dc-recap details summary { cursor: pointer; color: var(--dc-gold); }
.dc-recap details p { margin-top: 8px; }
/* Sous la synthèse (revoir, lien public, « Mes déclics ») : détail des tirages replié,
   ouvert par un clic sur le titre, avec un caret qui pivote. */
.dc-recap-details { padding-top: 14px; border-top: 1px solid var(--dc-line); }
.dc-recap-details > summary { display: flex; align-items: center; gap: 8px; cursor: pointer; list-style: none; font-weight: 600; color: var(--dc-gold); }
.dc-recap-details > summary::-webkit-details-marker { display: none; }
.dc-recap-details > summary::before { content: ''; width: 0; height: 0; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 7px solid currentColor; transition: transform .15s ease; }
.dc-recap-details[open] > summary::before { transform: rotate(90deg); }
.dc-recap-details[open] > summary { margin-bottom: 12px; }
