/*
Theme Name: Crown France - Le Journal
Theme URI: https://www.crown-france.fr/
Author: Crown France
Description: Theme WordPress sobre reprenant a l'identique l'identite visuelle de crown-france.fr (couleurs, police Inter, header, footer, navigation) afin que le blog "Le Journal" ne donne pas l'impression de changer de site.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crown-france-blog
Tags: blog, one-column, right-sidebar, custom-logo, custom-menu, translation-ready
*/

/* ==========================================================================
   1. VARIABLES  —  couleurs prelevees directement sur www.crown-france.fr
   ========================================================================== */
:root{
  --cf-accent:        #c51b1d;  /* rgb(197,27,29)  boutons, liens, onglet actif */
  --cf-accent-dark:   #a31618;
  --cf-text:          #212529;  /* rgb(33,37,41)   texte courant */
  --cf-text-muted:    rgba(33,37,41,.75);
  --cf-bg:            #ffffff;
  --cf-bg-tertiary:   #f8f9fa;  /* rgb(248,249,250) */
  --cf-border:        #dee2e6;  /* rgb(222,226,230) */
  --cf-footer-bg:     #212529;  /* rgb(33,37,41) */
  --cf-footer-text:   #dee2e6;  /* rgb(222,226,230) */
  --cf-footer-head:   #ffffff;
  --cf-container:     1140px;   /* .container max-width du site */
  --cf-font:          'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   2. BASE
   ========================================================================== */
*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{
  margin:0;
  background:var(--cf-bg);
  color:var(--cf-text);
  font-family:var(--cf-font);
  font-size:16px;
  line-height:1.5;
  font-weight:400;
  overflow-wrap:break-word;
}
img{max-width:100%;height:auto}
a{color:var(--cf-accent);text-decoration:none}
a:hover,a:focus{color:var(--cf-accent-dark);text-decoration:underline}
h1,h2,h3,h4,h5,h6{font-family:var(--cf-font);font-weight:600;color:var(--cf-text);line-height:1.25;margin:0 0 .5em}
h1{font-size:32px}
h2{font-size:26px}
h3{font-size:21px}
h4{font-size:18px}
p,ul,ol,blockquote,pre,table,figure{margin:0 0 1rem}
blockquote{border-left:3px solid var(--cf-accent);padding:.25rem 0 .25rem 1rem;margin-left:0;color:var(--cf-text-muted)}
code,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;font-size:.9em}
pre{background:var(--cf-bg-tertiary);border:1px solid var(--cf-border);padding:1rem;overflow:auto}
hr{border:0;border-top:1px solid var(--cf-border);margin:2rem 0}
table{width:100%;border-collapse:collapse}
th,td{border:1px solid var(--cf-border);padding:.5rem .75rem;text-align:left}
th{background:var(--cf-bg-tertiary);font-weight:600}
figcaption{font-size:14px;color:var(--cf-text-muted);padding-top:.35rem}

.cf-container{max-width:var(--cf-container);margin:0 auto;padding:0 12px;width:100%}
.screen-reader-text{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.skip-link:focus{position:static!important;width:auto;height:auto;clip:auto;margin:0;padding:.5rem 1rem;background:#fff;color:var(--cf-accent);z-index:9999;display:inline-block}

/* Boutons — reprise du .btn-primary du site */
.cf-btn{
  display:inline-block;background:var(--cf-accent);color:#fff;border:1px solid var(--cf-accent);
  padding:.5rem 1rem;font-size:16px;line-height:1.5;border-radius:.375rem;cursor:pointer;
  font-family:var(--cf-font);
}
.cf-btn:hover,.cf-btn:focus{background:var(--cf-accent-dark);border-color:var(--cf-accent-dark);color:#fff;text-decoration:none}

/* ==========================================================================
   3. HEADER  —  structure header-top / header-bottom du site
   Robustesse : le header ne casse jamais (titre long, pas de logo, menu long)
   ========================================================================== */
.cf-header{background:#fff}
.cf-header a{color:var(--cf-text)}

.cf-header-top{border-bottom:1px solid var(--cf-border);padding:4px 0;font-size:16px}
.cf-header-top__row{
  display:flex;flex-wrap:wrap;align-items:center;gap:.35rem 1rem;
  min-width:0;
}
.cf-header-top__phone{margin-right:auto;min-width:0;overflow-wrap:anywhere}
.cf-header-top__links{display:flex;flex-wrap:wrap;align-items:center;gap:.35rem 1rem;min-width:0}
.cf-header-top a:hover{color:var(--cf-accent);text-decoration:none}
@media (max-width:767px){.cf-header-top{display:none}}

.cf-header-bottom{border-bottom:1px solid var(--cf-border)}
.cf-header-bottom__row{
  display:flex;align-items:center;flex-wrap:wrap;
  gap:.5rem 1.5rem;min-width:0;
}
/* --- Zone marque : largeur bornee, le titre passe a la ligne sans casser --- */
.cf-brand{
  display:flex;align-items:center;min-width:0;flex:0 1 auto;
  max-width:100%;padding:8px 0;
}
.cf-brand__title{margin:0;font-size:16px;font-weight:600;line-height:1.25;min-width:0}
.cf-brand__link{display:block;min-width:0;max-width:100%;color:var(--cf-text)}
.cf-brand__link:hover{text-decoration:none;color:var(--cf-text)}
.cf-brand__logo{
  display:block;width:auto;height:auto;
  /* 144px de large = rendu identique au header de crown-france.fr (logo 1022x162 => 144x23) */
  max-width:min(144px,55vw);
  max-height:40px;             /* borne dure : jamais de logo geant, meme carre */
}
.cf-brand__text{
  display:block;max-width:min(360px,70vw);
  overflow-wrap:anywhere;hyphens:auto;   /* titre long => retour a la ligne */
  font-size:16px;font-weight:600;
}
.cf-brand__tagline{
  display:block;font-size:13px;font-weight:400;color:var(--cf-text-muted);
  max-width:min(360px,70vw);overflow-wrap:anywhere;
}

/* --- Navigation principale --- */
.cf-nav{min-width:0;flex:1 1 auto}
.cf-nav__list{
  list-style:none;margin:0;padding:0;
  display:flex;flex-wrap:wrap;align-items:center;min-width:0;
}
.cf-nav__list li{min-width:0}
.cf-nav__list a{
  display:block;padding:20px 8px;font-size:16px;font-weight:400;
  color:var(--cf-text-muted);line-height:1.5;overflow-wrap:anywhere;
}
.cf-nav__list a:hover,.cf-nav__list a:focus{color:var(--cf-accent);text-decoration:none}
/* Onglet actif : meme mise en valeur que sur le site (accent + soulignement) */
.cf-nav__list .cf-nav-current > a,
.cf-nav__list .current-menu-item > a{
  color:var(--cf-accent);font-weight:600;
  box-shadow:inset 0 -3px 0 0 var(--cf-accent);
}

/* --- Bouton menu mobile --- */
.cf-nav-toggle{
  display:none;margin-left:auto;background:none;border:1px solid var(--cf-border);
  border-radius:.375rem;padding:.4rem .6rem;cursor:pointer;color:var(--cf-text);
  font-family:var(--cf-font);font-size:14px;line-height:1;
}
@media (max-width:991px){
  .cf-header-bottom__row{flex-wrap:nowrap}
  .cf-nav-toggle{display:inline-flex;align-items:center;gap:.4rem;flex:0 0 auto}
  .cf-nav{flex:0 0 100%;order:3;display:none}
  .cf-nav.is-open{display:block}
  .cf-nav__list{flex-direction:column;align-items:stretch;padding-bottom:.5rem}
  .cf-nav__list a{padding:10px 0;border-top:1px solid var(--cf-border)}
  .cf-nav__list .cf-nav-current > a{box-shadow:inset 3px 0 0 0 var(--cf-accent);padding-left:8px}
}

/* ==========================================================================
   4. FIL D'ARIANE + LAYOUT
   ========================================================================== */
.cf-breadcrumb{font-size:16px;color:var(--cf-text);padding:1rem 0 0}
.cf-breadcrumb ol{list-style:none;margin:0;padding:0;display:flex;flex-wrap:wrap;gap:.35rem}
.cf-breadcrumb li:not(:last-child)::after{content:"/";padding-left:.35rem;color:var(--cf-text-muted)}
.cf-breadcrumb a{color:var(--cf-text)}
.cf-breadcrumb a:hover{color:var(--cf-accent)}

.cf-main{padding:1.5rem 0 3rem}
.cf-layout{display:flex;flex-wrap:wrap;gap:2rem}
.cf-content{flex:1 1 480px;min-width:0}
.cf-sidebar{flex:0 1 300px;min-width:0}
@media (max-width:767px){.cf-layout{gap:2.5rem}.cf-sidebar{flex:1 1 100%}}

.cf-page-title{font-size:32px;font-weight:600;margin-bottom:1.25rem}

/* ==========================================================================
   5. LISTE D'ARTICLES
   ========================================================================== */
.cf-post-list{display:flex;flex-direction:column;gap:1.5rem}
.cf-card{border:1px solid var(--cf-border);border-radius:.375rem;overflow:hidden;background:#fff}
.cf-card__thumb{display:block;line-height:0}
.cf-card__thumb img{width:100%;height:auto;display:block}
.cf-card__body{padding:1rem 1.25rem 1.25rem}
.cf-card__title{font-size:21px;margin:0 0 .35rem}
.cf-card__title a{color:var(--cf-text)}
.cf-card__title a:hover{color:var(--cf-accent);text-decoration:none}
.cf-meta{font-size:14px;color:var(--cf-text-muted);margin:0 0 .6rem}
.cf-meta a{color:var(--cf-text-muted)}
.cf-meta a:hover{color:var(--cf-accent)}
.cf-excerpt{margin:0 0 .9rem}
.cf-sticky-flag{display:inline-block;font-size:12px;font-weight:600;color:var(--cf-accent);background:var(--cf-bg-tertiary);border:1px solid var(--cf-border);border-radius:.25rem;padding:.1rem .4rem;margin-bottom:.4rem}

/* Article seul */
.cf-single__thumb{margin:0 0 1.25rem;line-height:0}
.cf-entry-content{font-size:16px}
.cf-entry-content > *:last-child{margin-bottom:0}
.cf-tags{margin:1.5rem 0 0;font-size:14px;color:var(--cf-text-muted)}
.cf-post-nav{display:flex;flex-wrap:wrap;gap:1rem;justify-content:space-between;border-top:1px solid var(--cf-border);margin-top:2rem;padding-top:1rem;font-size:15px}
.cf-post-nav > div{min-width:0;max-width:100%}

/* Pagination */
.cf-pagination{margin-top:2rem}
.cf-pagination .page-numbers{
  display:inline-block;padding:.35rem .7rem;border:1px solid var(--cf-border);
  border-radius:.375rem;margin:0 .2rem .4rem 0;color:var(--cf-text);
}
.cf-pagination .page-numbers:hover{border-color:var(--cf-accent);color:var(--cf-accent);text-decoration:none}
.cf-pagination .page-numbers.current{background:var(--cf-accent);border-color:var(--cf-accent);color:#fff}

/* ==========================================================================
   6. SIDEBAR / WIDGETS
   ========================================================================== */
.cf-widget{margin-bottom:1.75rem}
.cf-widget__title{font-size:18px;font-weight:600;margin:0 0 .6rem;padding-bottom:.4rem;border-bottom:1px solid var(--cf-border)}
.cf-widget ul{list-style:none;margin:0;padding:0}
.cf-widget li{padding:.3rem 0;border-bottom:1px solid var(--cf-border)}
.cf-widget li:last-child{border-bottom:0}
.cf-widget a{color:var(--cf-text)}
.cf-widget a:hover{color:var(--cf-accent)}

/* Formulaire de recherche */
.cf-search{display:flex;gap:.5rem;min-width:0}
.cf-search__field{
  flex:1 1 auto;min-width:0;padding:.5rem .75rem;font-size:16px;font-family:var(--cf-font);
  color:var(--cf-text);background:#fff;border:1px solid var(--cf-border);border-radius:.375rem;
}
.cf-search__field:focus{outline:0;border-color:var(--cf-accent);box-shadow:0 0 0 .2rem rgba(197,27,29,.15)}
.cf-search__submit{flex:0 0 auto}

/* ==========================================================================
   7. COMMENTAIRES
   ========================================================================== */
.cf-comments{margin-top:2.5rem;border-top:1px solid var(--cf-border);padding-top:1.5rem}
.cf-comments__title{font-size:21px;margin-bottom:1rem}
.comment-list{list-style:none;margin:0 0 1.5rem;padding:0}
.comment-list ul.children{list-style:none;margin:0;padding-left:1.25rem;border-left:1px solid var(--cf-border)}
.comment-list li{margin:0 0 1rem}
.comment-body{border:1px solid var(--cf-border);border-radius:.375rem;padding:1rem}
.comment-author{font-weight:600}
.comment-author img{border-radius:50%;vertical-align:middle;margin-right:.5rem}
.comment-metadata{font-size:14px;color:var(--cf-text-muted);margin-bottom:.5rem}
.comment-metadata a{color:var(--cf-text-muted)}
.bypostauthor > .comment-body{border-color:var(--cf-accent)}
.comment-respond{background:var(--cf-bg-tertiary);border:1px solid var(--cf-border);border-radius:.375rem;padding:1.25rem}
.comment-respond .comment-reply-title{font-size:18px;margin-top:0}
.comment-form label{display:block;font-size:14px;font-weight:600;margin-bottom:.25rem}
.comment-form input[type=text],
.comment-form input[type=email],
.comment-form input[type=url],
.comment-form textarea{
  width:100%;max-width:100%;padding:.5rem .75rem;font-size:16px;font-family:var(--cf-font);
  color:var(--cf-text);border:1px solid var(--cf-border);border-radius:.375rem;background:#fff;
}
.comment-form textarea{min-height:140px}
.comment-form p{margin-bottom:.85rem}
.comment-form .submit{ /* reprend .cf-btn */
  display:inline-block;background:var(--cf-accent);color:#fff;border:1px solid var(--cf-accent);
  padding:.5rem 1rem;font-size:16px;border-radius:.375rem;cursor:pointer;font-family:var(--cf-font);
}
.comment-form .submit:hover{background:var(--cf-accent-dark)}
.comment-notes,.comment-form-cookies-consent label{font-weight:400;font-size:14px;color:var(--cf-text-muted)}
.comment-form-cookies-consent input{margin-right:.4rem}

/* ==========================================================================
   8. 404 / AUCUN RESULTAT
   ========================================================================== */
.cf-404{max-width:640px}
.cf-404 .cf-search{margin:1.25rem 0}

/* ==========================================================================
   9. FOOTER  —  bloc sombre identique au site (#212529 / #dee2e6)
   ========================================================================== */
.cf-footer{background:var(--cf-footer-bg);color:var(--cf-footer-text);padding:40px 0 20px;font-size:16px;margin-top:2rem}
.cf-footer a{color:var(--cf-footer-text)}
.cf-footer a:hover,.cf-footer a:focus{color:#fff;text-decoration:underline}
.cf-footer__row{display:flex;flex-wrap:wrap;gap:2rem}
.cf-footer__col{flex:1 1 260px;min-width:0}
.cf-footer__title{font-size:16px;font-weight:600;color:var(--cf-footer-head);margin:0 0 .75rem}
.cf-footer__list{list-style:none;margin:0;padding:0}
.cf-footer__list li{margin-bottom:.35rem}
.cf-footer__logo{display:block;max-width:min(144px,55vw);max-height:40px;width:auto;height:auto;margin-bottom:1rem}
.cf-footer__addr{margin:0 0 .75rem;font-style:normal;line-height:1.5}
.cf-footer__addr strong{color:var(--cf-footer-head);font-weight:600}
.cf-footer__contact li{display:flex;gap:.4rem;min-width:0}
.cf-footer__bottom{
  border-top:1px solid rgba(255,255,255,.12);margin-top:1.75rem;padding-top:1rem;
  display:flex;flex-wrap:wrap;gap:.5rem 1.5rem;align-items:center;justify-content:space-between;
  font-size:15px;
}
.cf-footer__credit{display:flex;align-items:center;gap:.4rem;min-width:0}
.cf-footer__credit img{max-height:24px;width:auto}
